#include "Shared_mem.hpp"
#include "Fifo.hpp"

int main()
{
    NamedFifo fifo;
    FifoOper oper(O_RDONLY);

    Shared_mem shm(ftok(DEFAULT_PATH, DEFAULT_PJID), DEFAULT_SIZE, CREATOR);
    char* SharedArr = (char*)(shm.Begin());
    int n = 1;
    while(n)
    {
        n = oper.Read();
        std::cout << SharedArr << std::endl;
    }
    return 0;
}